<?php /* Smarty version Smarty-3.1.13, created on 2014-10-30 09:45:54
         compiled from "F:\phpweb\cms\templates\admin\users\useredit\user_integral_list.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1842754519852715673-14312102%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '08fde30dc9d416d988d240308e7b2479ba3820e1' => 
    array (
      0 => 'F:\\phpweb\\cms\\templates\\admin\\users\\useredit\\user_integral_list.tpl',
      1 => 1414633488,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1842754519852715673-14312102',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_545198527195b8_40936766',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_545198527195b8_40936766')) {function content_545198527195b8_40936766($_smarty_tpl) {?>
<script type="text/javascript">

	function loadListPage(index){
		var datas = $('#grid').datagrid('getRows');
		$('#list_grid').datagrid({
			url:'admin/users/getUserOriginListpage',
			queryParams: {
				userid: datas[index].userid 
			}
		});
		$('#list_grid').datagrid('load');
	}


	function integraltypeformat(value,row,index){
		if(value == 0){
			return "赚入"; 
		}else if(value == 1){
			return "消费";
		}
		  return "其它";
	}
	function pointtypeformat(value,row,index){
		if(value == 0){
			return "抽奖获取"; 
		}else if(value == 1){
			return "推荐获取";
		}
		else if(value == 2){
			return "积分申请";
		}
		else if(value == 3){
			return "管理员给予";
		}
		else if(value == 10){
			return "兑换现金";
		}
		else if(value == 11){
			return "兑换商品";
		}
		  return "其它";
	}
	function integralformat(value,row,index){
		var datas = $('#list_grid').datagrid('getRows');
		var item = datas[index];
		var value;
		var color='black';
		if(item.record_type == '0'){
			value = " + "+value;
			color = 'green'; 
		}else if(item.record_type == '1'){
			value= " - "+value; 
			color = 'red'; 
		}
		return '<font color="'+color+'">'+value+'</font>';
	}
	
</script>

<div id="user_integral_show" class="modal hide fade"
	style="width: 700px; height: 450px;">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal"
			aria-hidden="true">&times;</button>
		<h3>用户积分记录信息</h3>
	</div>
	<div class="modal-body">
		<table id="list_grid"
				data-options="singleSelect:true"
				class="easyui-datagrid" style="width: 650px; height: 320px;"
				 iconCls="icon-save" pagination="true"
				  rownumbers="true"  pageSize=15 pageList=[15,30,50]>
			<thead>
				<tr>
					<th data-options="field:'id',hidden:true"></th>
					<th data-options="field:'username'">用户名</th>
					<th data-options="field:'points_type',formatter:pointtypeformat">积分记录类型</th>
					<th data-options="field:'points',formatter:integralformat">积分数</th>
					<th data-options="field:'record_type',formatter:integraltypeformat">类型</th>
					<th data-options="field:'points_desc'">描述</th>
					<th data-options="field:'create_time'">记录时间</th>
				</tr>
			</thead>
		</table>
	</div>
</div><?php }} ?>